package top.hzy520.admin.common.util;

import org.apache.commons.lang.StringUtils;

import java.util.Random;

/**
 * @Author: HouZeYu
 * @Description: 生成随机数类
 * @Date: Created in 21:42 2018/4/2
 */
public class RandomNumberCode {
    /**
    *@Author: HouZeYu
    *@Description: 生成短信验证码
    *@Date: 21:46 2018/4/2
    */
    public static   String verfiyCode(){
        Random random=new Random();
        return StringUtils.substring(String.valueOf(random.nextInt()*-10),2,6);
    }
    public static String randomNo(){
        Random random =new Random();
        return StringUtils.substring(String.valueOf(Math.abs(random.nextInt()*-10))+System.currentTimeMillis(),1,17);
    }
}
